#  -*-coding:utf8 -*-
import csv
import os


class CsvInfo(object):
    ban = ""
    name = ""

    def csv_info(self):

        try:
            org_info = "物联网2103,大数据2101,大数据2102,大数据2104,软件2102,软件2103,软件2104,人工智能2101,人工智能2102,人工智能2103,云计算2101,云计算2102,云计算2103,金融2103,虚拟2101,计算机2101"
            list_org = org_info.split(",")
            name_info = "徐豪、王启业,苏德凯,田欣茹、景蕊、华琳琳、朱恒燕、张智勇、魏荷双、孙舒慧、颜孟、魏华源,姜敏、徐帅,纪旭钊、邵增龙、刘声浩、邢继森,高明伟、姬厚正、仲昭阳,徐淑蕾,刘云轩、蔡金广、娄奥丹、刘梦琦、刘鹏,邢永超,朱容霄,闫广浩、李秀锦、李雯康、刘奕辰、李凡函、邵铭瑞、王鲁慧、李文静、郝毓祺、石梦迪、赵佳慧,吴建飞、来庆安、李栋樑、鲁子睿,王情、张梦婷,陈阳灿,刘贺禹,翟玉金"
            list_orga = name_info.split(",")
            for i in range(0, len(org_info)):
                list_orgb = list_orga[i].split("、")
                for j in range(0, len(list_orgb)):
                    self.ban = list_org[i]
                    self.name = list_orgb[j]
                    with open("hellowds.csv", "a+", encoding="utf-8", newline="")as ff:
                        wtf = csv.writer(ff)
                        wtf.writerow([self.ban, self.name])
        except Exception as f:
            print(f)


if __name__ == '__main__':
    csvin = CsvInfo()
    csvin.csv_info()
